package com.hk.panel;

import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

import com.hk.BlackJack;
import com.hk.global.Constance;
import com.hk.global.PanelState;

@SuppressWarnings("serial")
public class LosePanel extends JPanel{
	private JLabel titleLabel;
	private JButton returnBtn;
	
	public LosePanel(){
		setBounds(0, 0, Constance.WIDTH, Constance.HEIGHT);
			
		setLayout(null);
		titleLabel = new JLabel("LOSE");
		titleLabel.setFont(new Font("Serif", Font.PLAIN, 30));
		titleLabel.setBounds(350, 50, 500, 300);

		returnBtn = new JButton("return");
		returnBtn.setBounds(350, 300, 100, 100);
		returnBtn.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				BlackJack.state = PanelState.PLAY;
				BlackJack.update();
			}
		});
		add(titleLabel);
		add(returnBtn);
	}
}
